assoc 0.1.3

Treat vectors like associative arrays
Documentation

assoc

Treat vectors like associative arrays.

Examples

use assoc::AssocExt;

let mut map = vec![("a", 1), ("b", 2)];
map.entry("c").or_insert(3);
assert_eq!(map.get(&"c"), Some(&3));
assert_eq!(map.entry("c").or_insert(4), &3);